<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Struct strtol</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Convert 2.0">
<link rel="up" href="../../header/boost/convert/strtol_hpp.html" title="Header &lt;boost/convert/strtol.hpp&gt;">
<link rel="prev" href="../../header/boost/convert/strtol_hpp.html" title="Header &lt;boost/convert/strtol.hpp&gt;">
<link rel="next" href="../../header/boost/make_default_hpp.html" title="Header &lt;boost/make_default.hpp&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="../../header/boost/convert/strtol_hpp.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/convert/strtol_hpp.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../header/boost/make_default_hpp.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.cnv.strtol"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct strtol</span></h2>
<p>boost::cnv::strtol — std::strtol-based extended converter </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/convert/strtol_hpp.html" title="Header &lt;boost/convert/strtol.hpp&gt;">boost/convert/strtol.hpp</a>&gt;

</span>
<span class="keyword">struct</span> <a class="link" href="strtol.html" title="Struct strtol">strtol</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">cnvbase</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">strtol</span> <span class="special">&gt;</span> <span class="special">{</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <a class="link" href="strtol.html" title="Struct strtol">boost::cnv::strtol</a>               <a name="boost.cnv.strtol.this_type"></a><span class="identifier">this_type</span><span class="special">;</span>
  <span class="keyword">typedef</span> <a class="link" href="cnvbase.html" title="Struct template cnvbase">boost::cnv::cnvbase</a><span class="special">&lt;</span> <a class="link" href="strtol.html#boost.cnv.strtol.this_type">this_type</a> <span class="special">&gt;</span> <a name="boost.cnv.strtol.base_type"></a><span class="identifier">base_type</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="strtol.html#idm12451-bb">private member functions</a></span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12452-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">int_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12460-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">sint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12468-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">lint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12476-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">llint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12484-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">uint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12492-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">usint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12500-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">ulint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12508-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">ullint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12516-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">flt_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12524-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">dbl_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12532-bb"><span class="identifier">str_to</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">ldbl_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
    <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12540-bb"><span class="identifier">to_str</span></a><span class="special">(</span><span class="identifier">int_type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
    <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12548-bb"><span class="identifier">to_str</span></a><span class="special">(</span><span class="identifier">uint_type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
    <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12556-bb"><span class="identifier">to_str</span></a><span class="special">(</span><span class="identifier">lint_type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
    <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12564-bb"><span class="identifier">to_str</span></a><span class="special">(</span><span class="identifier">ulint_type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
    <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12572-bb"><span class="identifier">to_str</span></a><span class="special">(</span><span class="identifier">llint_type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
    <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12580-bb"><span class="identifier">to_str</span></a><span class="special">(</span><span class="identifier">ullint_type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
    <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12588-bb"><span class="identifier">to_str</span></a><span class="special">(</span><span class="identifier">dbl_type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">,</span> <span class="keyword">typename</span> in_type<span class="special">&gt;</span> 
    <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12596-bb"><span class="identifier">i_to_str</span></a><span class="special">(</span><span class="identifier">in_type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">,</span> <span class="keyword">typename</span> out_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12605-bb"><span class="identifier">str_to_i</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">out_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">,</span> <span class="keyword">typename</span> out_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12614-bb"><span class="identifier">str_to_d</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">out_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="strtol.html#idm12623-bb">private static functions</a></span>
  <span class="keyword">static</span> <span class="keyword">double</span> <a class="link" href="strtol.html#idm12624-bb"><span class="identifier">adjust_fraction</span></a><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">int</span> <a class="link" href="strtol.html#idm12630-bb"><span class="identifier">get_char</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="strtol.html#idm12634-bb">public member functions</a></span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">,</span> <span class="keyword">typename</span> Type<span class="special">&gt;</span> 
    <span class="identifier">boost</span><span class="special">::</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12635-bb"><span class="identifier">i_to_str</span></a><span class="special">(</span><span class="identifier">Type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
    <span class="identifier">boost</span><span class="special">::</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a class="link" href="strtol.html#idm12644-bb"><span class="identifier">to_str</span></a><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">,</span> <span class="keyword">typename</span> out_type<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="strtol.html#idm12652-bb"><span class="identifier">str_to_i</span></a><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">out_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm16319"></a><h2>Description</h2>
<p>The converter offers a fairly decent overall performance and moderate formatting facilities. </p>
<div class="refsect2">
<a name="idm16322"></a><h3>
<a name="idm12451-bb"></a><code class="computeroutput">strtol</code> private member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12452-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">int_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12460-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">sint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12468-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">lint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12476-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">llint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12484-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">uint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12492-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">usint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12500-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">ulint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12508-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">ullint_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12516-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">flt_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12524-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">dbl_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12532-bb"></a><span class="identifier">str_to</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> v<span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">ldbl_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> r<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
  <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a name="idm12540-bb"></a><span class="identifier">to_str</span><span class="special">(</span><span class="identifier">int_type</span> v<span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span> buf<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
  <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a name="idm12548-bb"></a><span class="identifier">to_str</span><span class="special">(</span><span class="identifier">uint_type</span> v<span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span> buf<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
  <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a name="idm12556-bb"></a><span class="identifier">to_str</span><span class="special">(</span><span class="identifier">lint_type</span> v<span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span> buf<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
  <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a name="idm12564-bb"></a><span class="identifier">to_str</span><span class="special">(</span><span class="identifier">ulint_type</span> v<span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span> buf<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
  <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a name="idm12572-bb"></a><span class="identifier">to_str</span><span class="special">(</span><span class="identifier">llint_type</span> v<span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span> buf<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
  <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a name="idm12580-bb"></a><span class="identifier">to_str</span><span class="special">(</span><span class="identifier">ullint_type</span> v<span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span> buf<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
  <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a name="idm12588-bb"></a><span class="identifier">to_str</span><span class="special">(</span><span class="identifier">dbl_type</span> v<span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span> buf<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">,</span> <span class="keyword">typename</span> in_type<span class="special">&gt;</span> 
  <span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a name="idm12596-bb"></a><span class="identifier">i_to_str</span><span class="special">(</span><span class="identifier">in_type</span><span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">,</span> <span class="keyword">typename</span> out_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12605-bb"></a><span class="identifier">str_to_i</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">out_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">,</span> <span class="keyword">typename</span> out_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12614-bb"></a><span class="identifier">str_to_d</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">out_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm16863"></a><h3>
<a name="idm12623-bb"></a><code class="computeroutput">strtol</code> private static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">double</span> <a name="idm12624-bb"></a><span class="identifier">adjust_fraction</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">int</span> <a name="idm12630-bb"></a><span class="identifier">get_char</span><span class="special">(</span><span class="keyword">int</span> v<span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm16892"></a><h3>
<a name="idm12634-bb"></a><code class="computeroutput">strtol</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">,</span> <span class="keyword">typename</span> Type<span class="special">&gt;</span> 
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> 
  <a name="idm12635-bb"></a><span class="identifier">i_to_str</span><span class="special">(</span><span class="identifier">Type</span> in_value<span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span> buf<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> char_type<span class="special">&gt;</span> 
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="special">&gt;</span> <a name="idm12644-bb"></a><span class="identifier">to_str</span><span class="special">(</span><span class="keyword">double</span> value<span class="special">,</span> <span class="identifier">char_type</span> <span class="special">*</span> buf<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> string_type<span class="special">,</span> <span class="keyword">typename</span> out_type<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="idm12652-bb"></a><span class="identifier">str_to_i</span><span class="special">(</span><span class="identifier">cnv</span><span class="special">::</span><span class="identifier">range</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> range<span class="special">,</span> 
                <span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">out_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> result_out<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2009-2022 Vladimir
      Batov<p>
        Distributed under the Boost Software License, Version 1.0. See copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>.
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../header/boost/convert/strtol_hpp.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/convert/strtol_hpp.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../header/boost/make_default_hpp.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
